\documentclass[a4paper, 12pt]{article}

\newcommand{\inftyint}{\int_{-\infty}^{+\infty}}
\newcommand{\intwrtx}[1]{\int_{-\infty}^{+\infty} #1 \,dx}
\newcommand{\intwrt}[2]{\int_{-\infty}^{+\infty} #2 \,d #1}

\begin{document}

\[ \int_{-\infty}^{+\infty} f(x)\,dx. \]

\[ \inftyint f(x)\,dx. \]

\[ \intwrtx{f(x)}. \]

\[ \intwrt{y}{f(y)}. \]

\end{document}
